package com.tz.entity;

import javax.persistence.*;

@Entity
@Table(name="TBL_PICTURE")
public class Picture {

	private long id;

	private String path;

	private boolean cover;

	private String alt;

	public Picture() {
		
	}

	public Picture(long id, String path, boolean cover, String alt) {
		super();
		this.id = id;
		this.path = path;
		this.cover = cover;
		this.alt = alt;
	}

	@Id
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	@Column(name="p_path",nullable=false)
	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
	
	@Column(name="p_cover",nullable=false)
	public boolean isCover() {
		return cover;
	}

	public void setCover(boolean cover) {
		this.cover = cover;
	}

	@Column(name="p_alt",nullable=false)
	public String getAlt() {
		return alt;
	}

	public void setAlt(String alt) {
		this.alt = alt;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Picture [id=");
		builder.append(id);
		builder.append(", path=");
		builder.append(path);
		builder.append(", cover=");
		builder.append(cover);
		builder.append(", alt=");
		builder.append(alt);
		builder.append("]");
		return builder.toString();
	}
	
	
}
